﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucDateTimePicker.ascx.cs" Inherits="UserControls_ucDateTimePicker" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender ID="txtDate_CalendarExtender" runat="server"  
Enabled="True" Format="yyyyMMdd" PopupButtonID="ImageCal" TargetControlID="txtDate">
</ajaxToolkit:CalendarExtender>
<asp:Image ID="ImageCal" runat="server" ImageUrl="~/Images/Calendar_scheduleHS.png" />
<asp:RegularExpressionValidator ID="REV" runat="server" Display="Dynamic" ErrorMessage="日期格式有誤"
    SetFocusOnError="True"  ForeColor="Red" ControlToValidate="txtDate" ValidationExpression="\d{8}" />


<%--<asp:CompareValidator ID="CompareValidatorDate" runat="server" ControlToValidate="txtDate"
Display="Dynamic" ErrorMessage="日期格式有誤" Operator="DataTypeCheck" SetFocusOnError="True"
Type="Date" ForeColor="Red"></asp:CompareValidator>--%>
<%--<ajaxToolkit:ValidatorCalloutExtender ID="CompareValidatorDate_ValidatorCalloutExtender" runat="server" 
    TargetControlID="CompareValidatorDate">
</ajaxToolkit:ValidatorCalloutExtender>--%>